USE [NANS21V]
GO

/****** Object:  StoredProcedure [dbo].[ResultJumpOfHeight_Kinouflg]    Script Date: 06/11/2014 11:25:35 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ResultJumpOfHeight_Kinouflg]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[ResultJumpOfHeight_Kinouflg]
GO

CREATE PROCEDURE [dbo].[ResultJumpOfHeight_Kinouflg]
	@TAIKAINO int,
	@KYOGINO int,
	@KUMINO int,
	@ROUNDNO int,
	@SUBNO int,
	@SYUMOKUKUBUN int
AS
	SELECT DISTINCT 
		TKU.KYOGIFLG, 
		TKU.KINOUFLG, 
		TKU.HOST AS KHOST, 
		TKU.ROLLCALLFLG,
		TR.KUMIWAKEFLG,  
		TR.HOST AS RHOST
	FROM TBL_KUMI AS TKU,
		TBL_ROUND AS TR
	WHERE TKU.TAIKAINO = @TAIKAINO 
		AND TKU.KYOGINO = @KYOGINO 
		AND TKU.SUBNO = @SUBNO 
		AND TKU.KUMINO = @KUMINO
		AND TKU.ROUNDNO = @ROUNDNO
		AND TR.TAIKAINO = @TAIKAINO 
		AND TR.KYOGINO = @KYOGINO 
		AND TR.SUBNO = @SUBNO 
		AND TR.ROUNDNO = @ROUNDNO
RETURN 0
GO

